export const useFormEdit = ({ isEdit }: { isEdit: boolean }): IItemArray[] => {
  return [
    {
      name: 'dictName',
      label: '字典名称',
      type: 'Input',
      placeholder: '请输入字典名称',
      rules: [
        {
          required: true,
          message: '请输入字典名称',
        },
      ],
      config: {
        showCount: true,
        maxLength: 10,
        disabled: !!isEdit,
      },
    },
    {
      name: 'dictType',
      label: '字典类型',
      type: 'Input',
      placeholder: '请输入字典类型',
      rules: [
        {
          required: true,
          message: '请输入字典类型',
        },
      ],
      config: {
        showCount: true,
        maxLength: 20,
        disabled: !!isEdit,
      },
    },
    {
      name: 'remark',
      label: '字典描述',
      type: 'TextArea',
      placeholder: '请输入字典描述',
      config: {
        showCount: true,
        maxLength: 100,
      },
    },
    {
      name: 'status',
      label: '字典状态',
      type: 'Switch',
      rules: [
        {
          required: true,
          message: '请选择字典状态',
        },
      ],
      config: {
        checkedChildren: '开启',
        unCheckedChildren: '关闭',
      },
    },
  ]
}
export const useFormEditData = (): IItemArray[] => {
  return [
    {
      name: 'dictCode',
      label: '字典编码',
      type: 'Input',
      placeholder: '请输入字典编码',
      rules: [
        {
          required: true,
          message: '请输入字典编码',
        },
      ],
      config: {
        showCount: true,
        maxLength: 10,
      },
    },
    {
      name: 'dictValue',
      label: '字典名称',
      type: 'Input',
      placeholder: '请输入字典值',
      rules: [
        {
          required: true,
          message: '请输入字典值',
        },
      ],
      config: {
        showCount: true,
        maxLength: 10,
      },
    },
    {
      name: 'remark',
      label: '字典描述',
      type: 'TextArea',
      placeholder: '请输入字典描述',
      config: {
        showCount: true,
        maxLength: 100,
      },
    },
    {
      name: 'dictStatus',
      label: '字典状态',
      type: 'Switch',
      rules: [
        {
          required: true,
          message: '请选择字典状态',
        },
      ],
      config: {
        checkedChildren: '开启',
        unCheckedChildren: '关闭',
      },
    },
  ]
}
